/**
 * 采购订单 api 封装
 *
 * @Author:    AKITA
 * @Date:      2025-07-23 20:52:44
 * @Copyright  AKITA
 */
import {postRequest, getRequest, getDownload} from '/@/lib/axios';

export const saordApi = {
  queryPage: (param) => {
    return postRequest('/saord/queryPage', param);
  },

  add: (param) => {
    return postRequest('/saord/add', param);
  },

  update: (param) => {
    return postRequest('/saord/update', param);
  },

  delete: (id) => {
    return getRequest(`/saord/delete/${id}`);
  },

  batchDelete: (idList) => {
    return postRequest('/saord/batchDelete', idList);
  },

  info: (id) => {
    return getRequest(`/saord/info/${id}`);
  },

  print: (id) => {
    return getDownload(`/print/saord/${id}`);
  },


  infoUnexecute: (id) => {
    return getRequest(`/saord/infoUnexecute/${id}`);
  },

  infoUnexecuteBack: (id) => {
    return getRequest(`/saord/infoUnexecuteBack/${id}`);
  },


};

export const saordaApi = {
  queryPage: (param) => {
    return postRequest('/saorda/queryPage', param);
  },

  add: (param) => {
    return postRequest('/saorda/add', param);
  },

  update: (param) => {
    return postRequest('/saorda/update', param);
  },

  delete: (id) => {
    return getRequest(`/saorda/delete/${id}`);
  },

  batchDelete: (idList) => {
    return postRequest('/saorda/batchDelete', idList);
  },

  info: (id) => {
    return getRequest(`/saorda/info/${id}`);
  },

  infoUnexecute: (id) => {
    return getRequest(`/saorda/infoUnexecute/${id}`);
  },
  infoUnexecuteBack: (id) => {
    return getRequest(`/saorda/infoUnexecuteBack/${id}`);
  },
};
